import service from '@/utils/request'

// @Tags FileType
// @Summary 创建文件类型
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.FileType true "创建文件类型"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /fileType/createFileType [post]
export const createFileType = (data) => {
  return service({
    url: '/fileType/createFileType',
    method: 'post',
    data
  })
}

// @Tags FileType
// @Summary 删除文件类型
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.FileType true "删除文件类型"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /fileType/deleteFileType [delete]
export const deleteFileType = (data) => {
  return service({
    url: '/fileType/deleteFileType',
    method: 'delete',
    data
  })
}

// @Tags FileType
// @Summary 批量删除文件类型
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除文件类型"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /fileType/deleteFileType [delete]
export const deleteFileTypeByIds = (data) => {
  return service({
    url: '/fileType/deleteFileTypeByIds',
    method: 'delete',
    data
  })
}

// @Tags FileType
// @Summary 更新文件类型
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.FileType true "更新文件类型"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /fileType/updateFileType [put]
export const updateFileType = (data) => {
  return service({
    url: '/fileType/updateFileType',
    method: 'put',
    data
  })
}

// @Tags FileType
// @Summary 用id查询文件类型
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.FileType true "用id查询文件类型"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /fileType/findFileType [get]
export const findFileType = (params) => {
  return service({
    url: '/fileType/findFileType',
    method: 'get',
    params
  })
}

// @Tags FileType
// @Summary 分页获取文件类型列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取文件类型列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /fileType/getFileTypeList [get]
export const getFileTypeList = (params) => {
  return service({
    url: '/fileType/getFileTypeList',
    method: 'get',
    params
  })
}
